//
//  CZNoTalkCell.swift
//  GZWeibo666
//
//  Created by mac－gt on 15/12/1.
//  Copyright © 2015年 itcast. All rights reserved.
//

import UIKit

class CZNoTalkCell: UITableViewCell {
    var message: String? {
        didSet {
            messageLable.text = message
        }
    }
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        setUpLable()
    }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    func setUpLable(){
        contentView.addSubview(messageLable)
        messageLable.translatesAutoresizingMaskIntoConstraints = false
        
        contentView.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("H:|-0-[LAB]-0-|", options: NSLayoutFormatOptions(rawValue: 0), metrics: nil, views: ["LAB": messageLable]))
        contentView.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("V:|-0-[LAB(100)]-0-|", options: NSLayoutFormatOptions(rawValue: 0), metrics: nil, views: ["LAB": messageLable]))
    }
    lazy var messageLable:UILabel={
        let lable=UILabel()
        lable.font=UIFont.systemFontOfSize(16)
        lable.textColor=UIColor.orangeColor()
        lable.textAlignment=NSTextAlignment.Center
        return lable
    }()

}
